<?
include("includes/config.php");
include("includes/function.php");
include("includes/service.php");
if(strpos($_SERVER['REQUEST_URI'], 'php')){
	$uri = str_replace('.php', '', $_SERVER['REQUEST_URI']);
	echo 'ok';//header("Location: $uri");
}
if(($_SESSION['loggedin']!=1)&&(!strpos($_SERVER['REQUEST_URI'], "login"))){
	$uri = str_replace('/intruongthanh.com/', '', $_SERVER['REQUEST_URI']);
	$uri = str_replace('index', '', $uri);
	if($uri == ''){
		header("Location: login?");
	}
	else{
		header("Location: login?url=".$uri);
	}
	exit();
}
$do = $_REQUEST['do'];
$get = $_REQUEST['get'];
$loginid = $_SESSION['loginid'];
$query = mysql_query("SELECT * FROM `user` WHERE `id` = '$loginid'");
$usinfo = mysql_fetch_object($query);
$itt->assign('fullname', $usinfo->fullname);
$itt->assign('lastvisited', $usinfo->lastvisited);
$itt->assign('Year', date('Y', time()));
$itt->assign('year', date('y', time()));
$itt->assign('date', date('d-m-Y', time()));
?>